package com.yunji.app.base;

import com.yunji.base.business.PayoutPersonBusiness;
import com.yunji.base.domain.PayoutPersonDO;
import com.yunji.common.base.BaseController;
import com.yunji.common.base.response.Response;
import com.yunji.common.base.response.ResponseHelper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @version 1.0
 * @Project: yunji-coffee
 * @Package com.yunji.app.user
 * @FileName GatewayPayoutPersonController.java
 * @Copyright Copyright © 2024 云集互联. All Rights Reserved
 * Company		com
 * @CreateTime 2024-04-28 10:44:20
 * @Description 移动端-转账人员
 * @Modification Author                    History Time			Version				Description
 * --------------------------------------------------------------------------------
 * HuaAo				2024-04-28 10:44:20		1.0					1.0 Version
 * @since JDK 1.8.0_202
 */
@Api(tags = "移动端-转账人员")
@RestController
@RequestMapping("/gateway/person")
public class GateWayPayoutPersonController extends BaseController {
    @Resource
    PayoutPersonBusiness business;

    @ApiOperation("获取转账人员信息")
    @GetMapping("/info")
    public Response<List<PayoutPersonDO>> searchPerson() {
        return ResponseHelper.success(business.searchPerson());
    }

    @ApiOperation("更新转账人员信息")
    @PostMapping("/update")
    public Response<String> updatePerson(@RequestBody PayoutPersonDO person) {
        business.updatePerson(person);
        return ResponseHelper.success();
    }

}